home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 February
/
PCWorld_2000-02_cd.bin
/
Komunik
/
Webscr
/
HTMLtool
/
_SETUP.1
/
Statusbar Scroller.scp
< prev
next >
Wrap
Text File
|
1999-03-02
|
1KB
|
56 lines
<HTMLtool>Scrolls a string in the status bar</HTMLtool>
<!-- This script scrolls ' Your text goes here ' in the status bar -->
<SCRIPT LANGUAGE="JavaScript">
function statusscroll(seed,looped)
{
var msg = " Your text goes here ";
var putout = " ";
var c = 1;
if (looped > 10)
{ window.status="No it scolled often enough !"; }
else if (seed > 100)
{
seed--;
var cmd="statusscroll(" + seed + "," + looped + ")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 100 && seed > 0)
{
for (c=0 ; c < seed ; c++)
{ putout+=" "; }
putout+=msg.substring(0,100-seed);
seed--;
var cmd="statusscroll(" + seed + "," + looped + ")";
window.status=putout;
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 0)
{
if (-seed < msg.length)
{
putout+=msg.substring(-seed,msg.length);
seed--;
var cmd="infoscroll(" + seed + "," + looped + ")";
window.status=putout;
timerTwo=window.setTimeout(cmd,100); // 100
}
else
{
window.status=" ";
looped += 1;
var cmd = "infoscroll(100," + looped + ")";
timerTwo=window.setTimeout(cmd,75); // 75
}
}
}
// -->
<!--
statusscroll(100,1)
// -->
</SCRIPT>